﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace LabMS.Web.CommonPage
{
    public partial class ClassList2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                Gv2_DataBind(int.Parse(Request.QueryString["ID"].ToString()));
            }
        }

        protected void Gv2_DataBind(int ID)
        {
            ExtendBLL.ClassItem claItem = new ExtendBLL.ClassItem();
            DataSet ds = new DataSet();
            ds = claItem.GetListByTeaMisID(ID);
            Gv_Class.DataSource = ds;
            Gv_Class.DataBind();
        }

        protected void Gv_Class_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {
            Gv_Class.PageIndex = e.NewSelectedIndex;
            Gv2_DataBind(int.Parse(Request.QueryString["ID"].ToString()));
        }
    }
}
